//
//  ZYProxy.m
//  OC_Principle
//
//  Created by wangzhipan on 2025/2/13.
//

#import "ZYProxy.h"

@interface ZYProxy()

@property (nonatomic, weak) id target;
@end

@implementation ZYProxy


- (instancetype)initWithTarget:(id)target
{
    self.target = target;
    return self;
}

- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel
{
    return [self.target methodSignatureForSelector:sel];
}

- (void)forwardInvocation:(NSInvocation *)invocation
{
    [invocation invokeWithTarget:self.target];
}
@end
